package com.woniuxy.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniuxy.controller.form.FoodVarietyForm;
import com.woniuxy.dao.model.FoodVariety;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.dao.model.ProductsInfo;
import com.woniuxy.service.dto.FoodVarietyDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * <p>
 * 菜品 服务类
 * </p>
 *
 * @author psy
 * @since 2022-06-28
 */
public interface FoodVarietyService extends IService<FoodVariety> {
    //通过商家id和餐品id查询菜品
    List<FoodVarietyDto> getFoodByStoreIdAndProductsId(Long storeId, Long productsId);

    //通过商家id和餐品id查询菜品,查询8条
    List<FoodVarietyDto> getFoodByStoreIdAndProductsIdLimit8(Long storeId, Long productsId);

    //菜品新增
    boolean addFood(FoodVarietyForm foodVarietyForm);

    //菜品更新
    FoodVarietyDto updateFood(Long id, FoodVarietyForm foodVarietyForm);

    //通过关键字,模糊查询菜品
    List<FoodVarietyDto> getFoodByKeyword(String keyword);

    
    Page<FoodVariety> getMyFood(Long productsId, Long pageNum, Long pageSize);

    Page<FoodVariety> getAllMyFood(Long pageNum, Long pageSize);
}
